﻿<div ng-controller="payToDrawController">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-inverse">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default"
                           data-click="panel-expand"><i class="fa fa-expand"></i></a>
                    </div>
                    <h4 class="panel-title">监管放款查询</h4>
                </div>
                <div class="panel-body">
                    <div class="form-inline filter-option">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="pull-right">
                                    <input type="text" placeholder="请输入开始时间" id="start_time" name="start_time"
                                           class="form-control"/>
                                    <input type="text" placeholder="请输入结束时间" id="end_time" name="end_time"
                                           class="form-control"/>

                                    <input class="form-control" type="text" ng-model="filter.enterpriseName"
                                           placeholder="请输入企业客户名称">
                                    <input class="form-control" type="text" ng-model="filter.customerName"
                                           placeholder="请输入客户名称">
                                    <input class="form-control" type="text" ng-model="filter.personPhone"
                                           placeholder="请输入客户手机号(严格匹配)">
                                    <button class="btn btn-sm btn-info" ng-click="reflash()"><i
                                            class="fa fa-search"></i> 筛选
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <table id="data-table" ng-table="tableParams" template-pagination="template/pagination.html"
                           class="table table-striped table-bordered table-hover table-condensed">
                        <tr ng-repeat="item in $data">
                            <td data-title="'序号'" width="10%" class="text-center">{{ first + $index }}</td>
                            <td data-title="'打款审核管理员'"  class="text-center">
                                {{ item.user_name}}
                            </td>
                            <td data-title="'宝付订单号'"  class="text-center">
                                {{ item.baofoo_trans_no }}
                            </td>
                            <td data-title="'打款金额'"  class="text-right">
                                {{ item.pay_price | currency }}
                            </td>
                            <td data-title="'请求时间'" class="text-center">
                                {{ item.request_time |date: 'yyyy-MM-dd HH:mm:ss'}}
                            </td>
                            <td data-title="'成功时间'" class="text-left">
                                {{ item.success_time |date: 'yyyy-MM-dd HH:mm:ss'}}
                            </td>
                            <td class="text-center width-100 text-nowrap">
                                <button class="btn btn-info btn-xs" ng-click="show(item)"><i class="fa fa-edit"></i> 详细
                                </button>

                            </td>
                        </tr>
                    </table>
                </div>
                <div class="modal fade" id="modal-info">
                    <div class="modal-dialog" style="width:1100px">
                        <div class="modal-content">
                            <ng-form name="checkForm" novalidate>
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
                                    </button>
                                    <h4 class="modal-title"><i class="fa fa-lg fa-edit text-success"></i>打款详情</h4>
                                </div>
                                <div class="modal-body">
                                    <div class="form-horizontal">
                                        <div class="form-group width-full">
                                            <h4>审核信息</h4>
                                            <hr/>
                                            <label class="control-label col-md-2"> 审核管理员：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.user_name }}
                                            </div>
                                            <label class="control-label col-md-2"> 打款金额：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.pay_price |currency }}
                                            </div>
                                            <label class="control-label col-md-2"> 请求时间：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.request_time | date :'yyyy-MM-dd HH:mm:ss' }}
                                            </div>
                                            <label class="control-label col-md-2"> 成功时间：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.success_time | date :'yyyy-MM-dd HH:mm:ss' }}
                                            </div>
                                            <label class="control-label col-md-2"> 宝付订单号：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.baofoo_trans_no }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <h4>订单信息</h4>
                                            <hr/>
                                            <label class="control-label col-md-2"> 订单号码：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.order_number }}
                                            </div>
                                            <label class="control-label col-md-2"> 订单状态：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.order_status_name }} ->{{ model.detail.order_status_description }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="control-label col-md-2">
                                                票面金额[元]：</label>
                                            <div class="col-md-4 form-inline form-control-static">
                                                {{ model.detail.order_total_price }} &nbsp; &nbsp;{{
                                                amountInWords(model.detail.order_total_price) }}
                                            </div>
                                            <label class="control-label col-md-2">汇票到期日：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.bill_deadline_time | date: 'yyyy-MM-dd' }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="control-label col-md-2">汇票正面：</label>
                                            <div class="col-sm-4">
                                                <div class="tb-booth tb-pic tb-s250">
                                                    <a href="{{model.detail.bill_front_photo_path}}" target="_blank">
                                                        <img class="jqzoom" src="{{model.detail.bill_front_photo_path}}"
                                                             rel="{{model.detail.bill_front_photo_path}}" alt="汇票正面未上传"/>
                                                    </a>
                                                </div>
                                            </div>
                                            <label class="control-label col-md-2">汇票背面：</label>
                                            <div class="col-sm-4">
                                                <div class="tb-booth tb-pic tb-s250">
                                                    <a href="{{model.detail.bill_back_photo_path}}" target="_blank">
                                                        <img class="jqzoom" src="{{model.detail.bill_back_photo_path}}"
                                                             rel="{{model.detail.bill_back_photo_path}}" alt="汇票背面未上传"/>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="control-label col-md-2">承兑机构：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.acceptor_type_name }}
                                            </div>
                                            <label class="control-label col-md-2">承兑银行：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.acceptor_name }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="control-label col-md-2">
                                                出票人：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.drawer_name }}
                                            </div>
                                            <label class="control-label col-md-2"> 出票人账户：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.drawer_account_number }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="control-label col-md-2">
                                                出票账户持卡人：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.drawer_account_person }}
                                            </div>
                                            <label class="control-label col-md-2">
                                                出票账户银行：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.drawer_account_bank }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="control-label col-md-2">
                                                收票人：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.receiver_name }}
                                            </div>
                                            <label class="control-label col-md-2"> 收票人账户：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.receiver_account_number }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="control-label col-md-2">
                                                收票账户持卡人：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.receiver_account_person }}
                                            </div>
                                            <label class="control-label col-md-2">
                                                收票账户银行：</label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.detail.receiver_account_bank }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="control-label col-md-2"> 备注信息：</label>
                                            <div class="col-md-10 form-control-static">
                                                {{ model.detail.description }}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="modal-footer">
                                    <button class="btn btn-sm btn-white" data-dismiss="modal"><i
                                            class="fa fa-share-square-o"></i> 关闭
                                    </button>
                                </div>
                            </ng-form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

